
<%--
  Created by IntelliJ IDEA.
  User: csnf
  Date: 2024/12/24
  Time: 8:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            body {
                background-color: rgb(128, 255, 255);
            }

            .box {
                width: 500px;
                height: 400px;
                margin: 100px auto;
                background-color: white;
                border-radius: 20px;
            }

            .box1 {
                margin-top: 20px;
                text-align: center;
            }

            .box1 input {
                width: 300px;
                height: 40px;
                border: 2px solid gray;
                border-radius: 10px;
            }

            p {
                text-align: center;
                margin-top: 50px;
                font-size: 24px;
                font-weight: bolder;
            }
        </style>
    </head>

    <body>
    <script>
        var msg="${msg}";
        if(msg=="1"){
            alert("登录失败");
        }else {
            alert("没有该用户");
        }
    </script>
    <form action="user" method="post">
        <div class="box">
            <p>投票系统</p>
            <div class="box1">
                <input type="text" name="uName" placeholder="请输入用户名" />
            </div>
            <div class="box1">
                <input type="text" name="passWord" placeholder="请输入密码" />
            </div>
            <div class=" box1">
                <select name="roleId">
                    <c:forEach items="${roleList}" var="role">
                        <option value="${role.roleId}">${role.roleName}</option>
                    </c:forEach>
                </select>
            </div>
            <div class="box1">
                <input type="submit" value="登录" />
            </div>
        </div>
    </form>
    </body>
    </html>